package com.ruoyi.ihome.service.impl;

import com.ruoyi.ihome.domain.IhCollect;
import com.ruoyi.ihome.mapper.IhCollectMapper;
import com.ruoyi.ihome.service.IIhCollectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 收藏表Service业务层处理
 * 
 * @author wyt
 * @date 2024-08-16
 */
@Service
public class IhCollectServiceImpl implements IIhCollectService 
{
    @Autowired
    private IhCollectMapper ihCollectMapper;

    /**
     * 查询收藏表
     * 
     * @param id 收藏表主键
     * @return 收藏表
     */
    @Override
    public IhCollect selectIhCollectById(Long id)
    {
        return ihCollectMapper.selectIhCollectById(id);
    }

    /**
     * 查询收藏表列表
     * 
     * @param ihCollect 收藏表
     * @return 收藏表
     */
    @Override
    public List<IhCollect> selectIhCollectList(IhCollect ihCollect)
    {
        return ihCollectMapper.selectIhCollectList(ihCollect);
    }

    /**
     * 新增收藏表
     * 
     * @param ihCollect 收藏表
     * @return 结果
     */
    @Override
    public int insertIhCollect(IhCollect ihCollect)
    {
        return ihCollectMapper.insertIhCollect(ihCollect);
    }

    /**
     * 修改收藏表
     * 
     * @param ihCollect 收藏表
     * @return 结果
     */
    @Override
    public int updateIhCollect(IhCollect ihCollect)
    {
        return ihCollectMapper.updateIhCollect(ihCollect);
    }

    /**
     * 批量删除收藏表
     * 
     * @param ids 需要删除的收藏表主键
     * @return 结果
     */
    @Override
    public int deleteIhCollectByIds(Long[] ids)
    {
        return ihCollectMapper.deleteIhCollectByIds(ids);
    }

    /**
     * 删除收藏表信息
     * 
     * @param id 收藏表主键
     * @return 结果
     */
    @Override
    public int deleteIhCollectById(Long id)
    {
        return ihCollectMapper.deleteIhCollectById(id);
    }

    @Override
    public int deleteIhCollect(IhCollect ihCollect) {
        return ihCollectMapper.deleteIhCollect(ihCollect);
    }

    @Override
    public List<IhCollect> selectIhCollectRoomByUserId(Long userId) {
        return ihCollectMapper.selectIhCollectRoomByUserId(userId);
    }
}
